package com.zyz.M_File和IO流.File类.列出目录的下一级;

import java.io.File;

/**
 * @author: vick
 * @Date: 2025/4/7
 * @Description:
 * @version: 1.0
 */
public class Demo {
    public static void main(String[] args) {
        File file = new File("D:/work");
        String[] list = file.list();
        for (String dir : list) {
            System.out.println(dir);
        }

        System.out.println("=====");
        File[] files = file.listFiles();
        for (File file1 : files) {
            System.out.println(file1);
        }
    }
}
